package com.exporter.listeners;

import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

import javax.swing.JCheckBox;

public class ZipOptionListener implements ItemListener
{
        
        JCheckBox chkbxSftp;
        
        public ZipOptionListener(JCheckBox chkbxSftp)
        {
                this.chkbxSftp = chkbxSftp;
        }

        @Override
        public void itemStateChanged(ItemEvent ie)
        {
            if(ie.getStateChange() == ItemEvent.SELECTED)
            {
                chkbxSftp.setEnabled(true);
            }
            else
            {
                if(chkbxSftp.isSelected())
                {
                    chkbxSftp.setSelected( false );
                }
                chkbxSftp.setEnabled(false);
            }
        }

}
